package com.zgjkhis.modules.system.service.mapper;

import com.zgjkhis.common.mapper.CoreMapper;
import com.zgjkhis.modules.system.domain.DrugDeliveryDetail;
import com.zgjkhis.modules.system.domain.vo.DrugDeliveryDetailVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author yzq
 * @Description 药品出库详情
 * @Date 2021/6/23 9:45
 * @Param
 * @return
 **/
@Repository
public interface DrugDeliveryDetailMapper extends CoreMapper<DrugDeliveryDetail> {

    @Select("<script>select t.*,d.drug_type from his_drug_delivery_detail t\n" +
            "left join his_drug d on t.drug_id=d.id\n" +
            "where t.delivery_no=#{deliveryNo}</script>")
    List<DrugDeliveryDetailVO> queryList(@Param("deliveryNo") String deliveryNo);
}
